home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / runtime architecture / component manager / delegateonlycomponent / mycomponent.h < prev   
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.7 KB  |  57 lines

  1. /*
  2.     File:        MyComponent.h
  3.  
  4.     Contains:    simple component sample.
  5.  
  6.     Written by: John Wang    
  7.  
  8.     Copyright:    Copyright © 1994-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/28/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #ifdef THINK_C
  24. #define        applec
  25. #endif
  26.  
  27. #define        kDEBUGME                0
  28.  
  29. #define        kMyComponentSpec        1L
  30. #define        kMyComponentVersion        0L
  31.  
  32. typedef struct    {                        
  33.     //    Component stuff
  34.     ComponentInstance    delegate;                //    keep track who we are delegating it to.
  35.     ComponentInstance    self;                    //    self instance needed by MediaInitialize
  36.  
  37.     //    Characteristics
  38.     WindowPtr            backWindow;
  39.     CGrafPtr            moviePort;
  40.     short                windowKind;
  41.     
  42.     Boolean                fadeStatus;
  43.     Handle                handleBarStorage;
  44.     Boolean                mcVisible;
  45.     Boolean                mcAttached;
  46.     Boolean                firstTime;
  47. } PrivateGlobals;
  48.  
  49. /* ------------------------------------------------------------------------- */
  50.  
  51. pascal ComponentResult MyOpen(ComponentInstance self);
  52. pascal ComponentResult MyClose(Handle storage,ComponentInstance self);
  53. pascal ComponentResult MyCanDo(short selector);
  54. pascal ComponentResult MyVersion(void);
  55. pascal ComponentResult MyRegister(void );
  56. pascal ComponentResult MyTarget(Handle storage, ComponentInstance self);
  57.